

#ifndef UC_GEPLANE_H
#define UC_GEPLANE_H

#include "zgeplanar.h"
#pragma pack (push, 8)

class UcGeBoundedPlane;
class UcGeLine3d;

class
GE_DLLEXPIMPORT
UcGePlane : public UcGePlanarEnt
{
public:

    static const UcGePlane kXYPlane;
    static const UcGePlane kYZPlane;
    static const UcGePlane kZXPlane;

    UcGePlane();
    UcGePlane(const UcGePlane& src);
    UcGePlane(const UcGePoint3d& origin, const UcGeVector3d& normal);

    UcGePlane(const UcGePoint3d& pntU, const UcGePoint3d& org, const UcGePoint3d& pntV);

    UcGePlane(const UcGePoint3d& org, const UcGeVector3d& uAxis,
              const UcGeVector3d& vAxis);
    UcGePlane(double a, double b, double c, double d);

    double         signedDistanceTo (const UcGePoint3d& pnt) const;

    ZSoft::Boolean intersectWith    (const UcGeLinearEnt3d& linEnt, UcGePoint3d& resultPnt,
                                     const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean intersectWith    (const UcGePlane& otherPln, UcGeLine3d& resultLine,
                                     const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean intersectWith    (const UcGeBoundedPlane& bndPln, UcGeLineSeg3d& resultLineSeg,
                                     const UcGeTol& tol = UcGeContext::gTol) const;

    UcGePlane&     set              (const UcGePoint3d& pnt, const UcGeVector3d& normal);
    UcGePlane&     set              (const UcGePoint3d& pntU, const UcGePoint3d& org,
                                     const UcGePoint3d& pntV);
    UcGePlane&     set              (double a, double b, double c, double d);
    UcGePlane&     set              (const UcGePoint3d& org,
                                     const UcGeVector3d& uAxis,
                                     const UcGeVector3d& vAxis);

    UcGePlane&     operator =       (const UcGePlane& src);
};

#pragma pack (pop)
#endif
